package com.rick.test;

import java.awt.*;
import java.awt.event.KeyEvent;

public class MyRobot {

    static Robot robot;

    static {
        try {
            robot = new Robot();
        } catch (AWTException e) {
            e.printStackTrace();
        }
    }

    public static void main(String[] args) {
        robot.delay(3000);
        for (; ; ) {
            for (int i = 0; i < 5; i++) {
                robot.keyPress(KeyEvent.VK_CONTROL);
                robot.keyPress(KeyEvent.VK_V);

                robot.keyRelease(KeyEvent.VK_V);
                robot.delay(getSe());
                robot.keyRelease(KeyEvent.VK_CONTROL);
                robot.delay(getSe());
                robot.keyPress(KeyEvent.VK_ENTER);
                robot.keyRelease(KeyEvent.VK_ENTER);

                robot.delay(getSe() + 15000);
                for (int j = 0; j < 5; j++) {
                    robot.delay(1000 * 60);
                }
            }

            robot.delay(1000 * 60);
        }

    }

    static int getSe() {
        return (int) (Math.random() * 100);
    }
}
